<template>
  <div style="padding: 20px">
    <el-card>
      <div slot="header">
        <span>添加广告</span>
        <el-button
          style="float: right; padding: 0; margin-left: 10px"
          >返回</el-button
        >
        <el-button style="float: right; padding: 0" type="text">保存</el-button>
      </div>
      <div style="padding-top: 20px;">
        <el-form ref="form" :model="form" label-width="120px">
          <el-form-item label="广告标题">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="广告位">
            <el-select v-model="model1" placeholder="请选择">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="本地上传">
            <el-upload
              action="https://jsonplaceholder.typicode.com/posts/"
              list-type="picture-card"
              :on-preview="handlePictureCardPreview"
              :on-remove="handleRemove"
            >
              <i class="el-icon-plus"></i>
            </el-upload>
          </el-form-item>
          <el-form-item label="或图片地址">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="图片说明文字">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="开始时间">
            <el-date-picker
              v-model="value1"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item label="结束时间">
            <el-date-picker
              v-model="value1"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item label="排序">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="目标地址">
            <el-radio-group v-model="model">
              <el-radio :label="label">自定义链接</el-radio>
              <el-radio :label="label">跳转站内</el-radio>
              <el-radio :label="label">绑定企业</el-radio>
            </el-radio-group>
          </el-form-item>
          <el-form-item label="自定义跳转链接">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="是否显示">
            <el-switch v-model="model"></el-switch>
          </el-form-item>
          <el-form-item label="">
            <el-button type="primary">保存</el-button>
            <el-button @click="back">返回</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      model: true,
    };
  },
  methods: {
    back() {
      // console.log(1);
      this.$router.back()
    }
  }
};
</script>

<style lang="scss" scoped></style>
